
cc.Class({
    extends: cc.Component,

    properties: {
        className:"settinglayer",
    },

    // LIFE-CYCLE CALLBACKS:

    onLoad: function () {
        this.node.thisJS = this;
        this.score = cc.find("score",this.node);
        this.score.active = false ;
        this.initUI();
    },

    initUI: function(){
        EventManager.addEventObeserveF(EventConfig.showRoomInfo, handler(this,
            this.showRoomInfo),"settinglayer");    
    },
    showRoomInfo:function(info){
        if(info.err_no == 1){
            return ;
        }
    //    this.score.active = true ;
     //  this.score.getComponent(cc.Label).string = "底分：" + info["gold_base_chip"] +"分";
    },  
    audioClick:function(){
         EventManager.dispatchEventF(EventConfig.soundClick,"");
    },

    ruleClick:function(){
         EventManager.dispatchEventF(EventConfig.ruleClick,"");
    },

    chatClick:function(){
        EventManager.dispatchEventF(EventConfig.chatClick,"");
    },
    tipsClick:function(){
        console.log("tipsClick");
        EventManager.dispatchEventF(EventConfig.tipsClick,"");
    },
    homeClick:function(){
        console.log("homeClick");
        EventManager.dispatchEventF(EventConfig.homeClick,"");
    },
});